﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Tron.DataStructures;

namespace Tron.Players
{
    abstract class Player
    {
        public int PlayerIndex { get; private set; }

        public Player(int playerIndex)
        {
            this.PlayerIndex = playerIndex;
        }

        /// <summary>
        /// This method is called every time a new move direction must be chosen.
        /// </summary>
        public abstract void Update(Percepts percepts, Actions actions);

        /// <summary>
        /// This method is called when a game ends.
        /// A player is awarded a score of 1 for winning, 0 for drawing, and -1 for losing.
        /// </summary>
        public virtual void GameOver(Percepts percepts, List<int> playerScores) { }

        /// <summary>
        /// This method is called when a new game is beginning.
        /// </summary>
        public virtual void NewGame() { }

        /// <summary>
        /// This method is called when the game application is about to shut down.
        /// </summary>
        public virtual void SaveResults() { }
    }
}
